package demo.issuetracker.dao;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import demo.issuetracker.entity.User;

public interface UserDao {
    /**
     * The "Create" semantics of "CRUD"
     */
    public void create(User user);

    /**
     * Create a new instance of this object
     */
    public User newInstance();

    /**
     * The "Update" semantics of "CRUD"
     */
    public void update(User user);
    

    /**
     * Find by Primary key
     * 
     * The "read" operation of CRUD
     */
    public User findByPrimaryKey(String key);

    public User findByUsernameAndPassword(String username, String password);

    /**
     * The "Create" or "Update" semantics of "CRUD"
     */
    public void createOrUpdate(User user);

    /**
     * The "delete" semantics of "CRUD"
     */
    public void delete(User user);


    /**
     * All Users. Display all Users in the system.
     * 
     * The "read" operation of CRUD
     */
    public List<User> findUserList(Map<String, Object> params);

    /**
     * Generic method to search by any property
     * 
     * @param <K>
     * @param name
     * @param value
     * @return
     *
     * @author Vineet Manohar
     */
    public <K> List<User> findBy(String name, K value);
}// clickframes::version=3807957296::clickframes